Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODPart


Draw

The Draw method should draw this part within the area that needs updating in the specified facet.

void Draw (in ODFacet facet, 
           in ODShape invalidShape);
facet
A reference to a facet in which this part is to draw.
invalidShape
A reference to a shape object defining the area of the facet that needs updating, expressed in frame coordinates.
DISCUSSION
OpenDoc calls this method when an update event occurs that involves a facet of this part. Your part's Draw method should make the actual platform-specific drawing calls.

Your part's Draw method should draw this part's content on the facet's canvas, updating the portion of the facet specified in the invalid shape. Your part must determine whether it should draw on the screen or to a printer, and then draw itself appropriately.

OVERRIDING
When you subclass ODPart, you must override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.

EXCEPTIONS
kODErrInvalidFrame
The specified frame is not a display frame of this part.
SEE ALSO
The ODFacet::Draw method (page 242).
The ODFacet::Update method (page 256).
The ODWindow::Update method (page 838).
"The Draw Method" on page 63 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"The Draw Method of Your Part Editor" on page 158 in OpenDoc Programmer's Guide.
"Issues for All Parts" on page 176 in OpenDoc Programmer's Guide.
"Update Events" on page 194 in OpenDoc Programmer's Guide.
"Invalidating and Updating" on page 214 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help